//
//  JJCollectionViewCell.m
//  MyAnimations
//
//  Created by jxf on 15/12/27.
//  Copyright © 2015年 JJ.sevn. All rights reserved.
//

#import "JJCollectionViewCell.h"

@implementation JJCollectionViewCell

+ (JJCollectionViewCell *)collectionViewCellWithCollectionView:(UICollectionView *)collectionView andIndexPath:(NSIndexPath *)indexPath
{
    static NSString *ID = @"pic";
    JJCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
    if (!cell) {
        cell = [[JJCollectionViewCell alloc] init];
    }
    
    NSString *imageName = [NSString stringWithFormat:@"%zd", indexPath.row+1];
    UIImageView *imageV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]];
    [cell.contentView addSubview:imageV];
    imageV.frame = CGRectMake(0, 0, 100, collectionView.frame.size.height);
    cell.contentView.layer.cornerRadius = 10;
    cell.contentView.clipsToBounds = YES;
    return cell;
}

@end
